<extend name="Common@Layout:hui-admin" />
<block name="title"><title>Administator管理后台</title></block>
<block name="style">
</block>

<block name="main">
	<nav class="breadcrumb">
		<i class="Hui-iconfont"></i>
		 首页 <span class="c-gray en">&gt;</span>
		 内容管理 <span class="c-gray en">&gt;</span>  
		 学期列表 
		<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
	</nav>
	
	<div class="pd-20">
		<div class="cl pd-5 bg-1 bk-gray mt-20"> 
			<span class="l ml-20"> 
				<a class="btn btn-primary radius" href="javascript:;" onclick="open_iframe_dialog('{:U('Termadmin/edit')}','创建学期',['100%','100%'],1)"><i class="Hui-iconfont"></i> 添加学期</a> 
				<a class="btn btn-primary radius ajax-get shuaxin" data-url="{:U('createnumber')}" href="javascript:;" title="新学期重置报名人数">更新学期与人员</a>
			</span> 
		</div>
		<php>
			$result = _get_list_data('/Ygcl/Termadmin/index/',$_GET,$map,D('YgclTerm'));
		</php>
		<form class="mini-form">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<th width="25"><input type="checkbox" name="" value=""></th>
					<th width="80">ID</th>
					<th>学期</th>
					<th width="120">开始时间</th>
					<th width="120">结束时间</th>
					<th width="120">更新时间</th>
					<th width="60">状态</th>
					<th width="120">操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="result['data']['list']" item="vo">
				<tr class="text-c">
					<td><input type="checkbox" value="{$vo['id']}" name="ids[]"></td>
					<td>{$vo['id']}</td>
					<td class="text-l">{$vo['title']}</td>
					<td>{$vo.start_time}</td>
					<td>{$vo.end_time}</td>
					<td>{$vo.create_time}</td>
					<td class="td-status">
						<if condition="$vo['status'] eq 1">
						<span class="label label-success radius">运行中</span>
						</if>
						<if condition="$vo['status'] eq 2">
						<span class="label label-default radius">已过期</span>
						</if>
					</td>
					<td class="f-14 td-manage">
						<if condition="$vo['status'] eq 1">
						<a style="text-decoration:none" class="ml-5 ajax-get shuaxin" data-url="{:U('Termadmin/changestatus','id='.$vo['id'].'&status=2')}" href="javascript:;" title="已结束"><i class="Hui-iconfont"></i></a>
						</if>
						<if condition="$vo['status'] eq 2">
						<a style="text-decoration:none" class="ml-5 ajax-get shuaxin" data-url="{:U('Termadmin/changestatus','id='.$vo['id'].'&status=1')}" href="javascript:;" title="运行中"><i class="Hui-iconfont"></i></a>
						</if>
						<a style="text-decoration:none" class="ml-5" onclick="open_iframe_dialog('{:U('Termadmin/edit',array('id'=>$vo['id']))}','编辑学期',['100%','100%'],1)" href="javascript:;" title="编辑"><i class="Hui-iconfont"></i></a>
            			<a style="text-decoration:none" class="ml-5 mini_del" data-url="{:U('Termadmin/del','ids='.$vo['id'])}" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		</form>
		{$result['pagetpl']}
	</div>
	
	
</block>

<block name="script">
<script>

</script>
</block>